<!-- layui -->
<link rel="stylesheet" href="{{ data.yunjStaticPrefix }}/static/yunj/libs/layui_{{ data.layuiVersion }}/css/layui.css">
<link rel="stylesheet" href="{{ data.yunjStaticPrefix }}/static/yunj/css/yunj.min.css?v={{ data.version }}">
<script src="{{ data.yunjStaticPrefix }}/static/yunj/libs/layui_{{ data.layuiVersion }}/layui.js" charset="utf-8"></script>

<!-- style_file_list -->
<!-- 配置 -->
{% for item in data.styleFileList %}
<link rel="stylesheet" href="{{ item }}">
{% endfor %}
<!-- 页面渲染 -->
{% if data.styleFiles %}
{% for item in data.styleFiles %}
<link rel="stylesheet" href="{{ item }}">
{% endfor %}
{% endif %}

<script type="text/javascript">
    layui.config({
        version: '{{ data.version }}',
        base: '',
    }).extend({{ data.layModuleExtends|tojson|safe }});
    window.yunj={};

    window.YUNJ_VERSION='{{ data.version }}';
    window.YUNJ_CONFIG={{ data.exposeConfig|tojson|safe }};
    window.YUNJ_THEME={{ data.themeConfig|tojson|safe }};
    {% if data.yunj_form %}
    window.YUNJ_FORM={{ data.yunj_form|tojson|safe }};
    {% endif %}
    {% if data.yunj_table %}
    window.YUNJ_TABLE={{ data.yunj_table|tojson|safe }};
    {% endif %}
    {% if data.yunj_import %}
    window.YUNJ_IMPORT={{ data.yunj_import|tojson|safe }};
    {% endif %}

    // 监听表单禁止（回车）自动提交
    document.addEventListener('submit', function(event) {
        if (event.target.tagName.toLowerCase() === 'form') {
            event.preventDefault(); // 阻止表单的默认提交行为
        }
    }, false); // 使用冒泡阶段
</script>

<!-- script_file_list -->
<!-- 配置 -->
{% for item in data.scriptFileList %}
<script type="text/javascript" src="{{ item }}" charset="utf-8"></script>
{% endfor %}
<!-- 页面渲染 -->
{% if data.scriptFiles %}
{% for item in data.scriptFiles %}
<script type="text/javascript" src="{{ item }}" charset="utf-8"></script>
{% endfor %}
{% endif %}